-- GENERATED SPELL FOR [Coilfang Enchantress] --


function spell0_17961(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(32173,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17961', 9500, 1)
end

function spell1_17961(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(15234,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17961', 3000, 1)
end

function spell2_17961(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(37664,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17961', 3000, 1)
end

function spell3_17961(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(32193,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17961', 15000, 1)
end

function spell4_17961(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(37665,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17961', 15000, 1)
end

function Sorts_17961(pUnit, Event)
local choix_sorts_17961 = math.random(0, 4)
if choix_sorts_17961 == 0 then
pUnit:RegisterEvent('spell0_17961', 1, 1)
end
if choix_sorts_17961 == 1 then
pUnit:RegisterEvent('spell1_17961', 1, 1)
end
if choix_sorts_17961 == 2 then
pUnit:RegisterEvent('spell2_17961', 1, 1)
end
if choix_sorts_17961 == 3 then
pUnit:RegisterEvent('spell3_17961', 1, 1)
end
if choix_sorts_17961 == 4 then
pUnit:RegisterEvent('spell4_17961', 1, 1)
end
end

function mob17961_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17961', math.random(1500, 3000), 1)
end

function mob17961_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17961_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17961_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17961, 1, 'mob17961_Action')
RegisterUnitEvent(17961, 2, 'mob17961_Leave')
RegisterUnitEvent(17961, 3, 'mob17961_Kill')
RegisterUnitEvent(17961, 4, 'mob17961_Die')
